package apis

import (
	"gitee.com/byx_darwin/ncloud-go/core"
	"gitee.com/byx_darwin/ncloud-go/core/net/consts"
)

type QueryCityListConditions struct {
	CountryCode string `json:"country_code"`
}

type QueryCityListGetRequest struct {
	core.NCloudRequest
	QueryCityListConditions
}

func NewQueryCityListGetRequestWithParams(countryCode string) *QueryCityListGetRequest {
	return &QueryCityListGetRequest{
		NCloudRequest: core.NCloudRequest{
			Path:   "/city",
			Method: consts.MethodGet,
		},
		QueryCityListConditions: QueryCityListConditions{
			CountryCode: countryCode,
		},
	}
}

func (r *QueryCityListGetRequest) GetPath() string {
	path := r.Path
	path += "?country_code=" + r.CountryCode
	return path
}

type QueryCityListGetResponse struct {
	Ok      bool     `json:"ok"`
	Msg     string   `json:"msg"`
	Data    []string `json:"data"`
	TrackID string   `json:"track_id"`
}
